import request from '@/utils/request'

// 查询巡区列表
export function listPatrolArea(query) {
  return request({
    url: '/system/patrolArea/list',
    method: 'get',
    params: query
  })
}

// 查询巡区详细
export function getPatrolArea(areaId) {
  return request({
    url: '/system/patrolArea/' + areaId,
    method: 'get'
  })
}

// 新增巡区
export function addPatrolArea(data) {
  return request({
    url: '/system/patrolArea',
    method: 'post',
    data: data
  })
}

// 修改巡区
export function updatePatrolArea(data) {
  return request({
    url: '/system/patrolArea',
    method: 'put',
    data: data
  })
}

// 删除巡区
export function delPatrolArea(areaId) {
  return request({
    url: '/system/patrolArea/' + areaId,
    method: 'delete'
  })
}

// 导出巡区
export function exportPatrolArea(query) {
  return request({
    url: '/system/patrolArea/export',
    method: 'get',
    params: query
  })
} 